home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2005 March / Macworld CD March 2005 - Marathon Trilogy.iso / Shareware World / iPod / iPodderX.sit / iPodderX / iPodderX.app / Contents / Resources / eSellerateObjC.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-01-07  |  13.6 KB  |  158 lines

  1. //
  2. //  eSellerateObjC.h
  3. //  eSellerate Static Library
  4. //
  5. //  Created by Josh Ferguson on Mon Jul 15 2002.
  6. //  Copyright (c) 2004 eSellerate. All rights reserved.
  7. //
  8.  
  9. #define eSellerate_FALSE 0
  10. #define eSellerate_TRUE  1
  11. #define eSellerate_TRUE_ButNoManualActivation 2 /* additional value for use by ActivateSerialNumber */
  12.  
  13. /* eSellerate_ErrorCode return values ***************************************************************/
  14. #define eSellerate_SUCCESS  0 /* returned if the function fulfills the action requested of it       */
  15. #define eSellerate_FAILURE  1 /* returned if the function cannot fulfill the action requested of it */
  16. #define eSellerate_NOENGINE 2 /* returned if the Engine cannot be found                             */
  17. #define eSellerate_CANCELED 3 /* returned if the Engine was exited before the action was completed  */
  18. #define eSellerate_NOUPDATE 4 /* returned by SilentCheckForUpdate if no update is available         */
  19.  
  20. typedef NSString *      eSellerate_InputString;
  21. typedef NSString *      eSellerate_OutputString;
  22. typedef NSURL *         eSellerate_FileLocation;
  23.  
  24. typedef Handle          eSellerate_ResultData;
  25. typedef unsigned long   eSellerate_ErrorCode;
  26. typedef BOOL            eSellerate_TrueOrFalse; /* true if non-zero, false if zero */
  27.  
  28. typedef short           eSellerate_DaysSince2000;
  29.  
  30. #define keSellerateProductIDKey         @"ProductIDKey"     // Key for Product ID in shopping cart, serial number, and file location dictionaries
  31. #define keSellerateSKUIDKey             @"SKUIDKey"         // Key for SKU ID in shopping cart dictionary
  32. #define keSellerateSerialNumberKey      @"SerialNumberKey"  // Key for serial number in the serial number dictionary
  33. #define keSellerateNameBasedKey         @"NameBasedKey"     // Key for the string used in a name-based key serial number
  34. #define keSellerateFileLocationKey      @"FileLocation"     // Key for file location in file location dictionary
  35.  
  36. #import <Foundation/Foundation.h>
  37.  
  38. @interface eSellerateObject : NSObject {
  39.     eSellerate_ResultData   resultData;
  40. }
  41.                                                                                         /* call on the Engine to perform a purchase ******************/
  42. - (eSellerate_ErrorCode)purchaseWithPublisherID:(eSellerate_InputString)publisherID     /* publisher ID code (always needed)                         */
  43.                                       eSellerID:(eSellerate_InputString)eSellerID       /* eSeller ID code (always needed)                           */
  44.                                       previewID:(eSellerate_InputString)previewID       /* preview certificate ID code                               */
  45.                                        errorURL:(eSellerate_InputString)errorURL        /* URL to show in case of error                              */
  46.                                    openingTitle:(eSellerate_InputString)openingTitle    /* custom title of the opening page of the Wizard            */
  47.                                     openingText:(eSellerate_InputString)openingText     /* custom first paragraph of the opening page of the Wizard  */
  48.                                      showFolder:(eSellerate_TrueOrFalse)showFolder      /* have the Engine open a window to display downloaded files */
  49.                                      trackingID:(eSellerate_InputString)trackingID      /* tracking ID code                                          */
  50.                                     affiliateID:(eSellerate_InputString)affiliateID     /* affiliate ID code                                         */
  51.                                        couponID:(eSellerate_InputString)couponID        /* coupon ID code                                            */
  52.                                    activationID:(eSellerate_InputString)activationID    /* activation ID code, to activate serial number             */
  53.                                       extraData:(eSellerate_InputString)extraData;      /* extra information, for instance for custom serial numbers */
  54.             
  55.                                                                                         /* call on the Engine to reinstall a previous purchase *******/
  56. - (eSellerate_ErrorCode)reinstallWithPublisherID:(eSellerate_InputString)publisherID    /* publisher ID code (always needed)                         */
  57.                                        eSellerID:(eSellerate_InputString)eSellerID      /* eSeller ID code (always needed)                           */
  58.                                        previewID:(eSellerate_InputString)previewID      /* preview certificate ID code                               */
  59.                                         errorURL:(eSellerate_InputString)errorURL       /* URL to show in case of error                              */
  60.                                     openingTitle:(eSellerate_InputString)openingTitle   /* custom title of the opening page of the Wizard            */
  61.                                      openingText:(eSellerate_InputString)openingText    /* custom first paragraph of the opening page of the Wizard  */
  62.                                       showFolder:(eSellerate_TrueOrFalse)showFolder     /* have the Engine open a window to display downloaded files */
  63.                                       trackingID:(eSellerate_InputString)trackingID     /* tracking ID code                                          */
  64.                                     activationID:(eSellerate_InputString)activationID;  /* activation ID code, to activate serial number             */
  65.  
  66.                                                                                             /* call on the Engine to check if an update is available *****/
  67. - (eSellerate_ErrorCode)checkForUpdateWithPublisherID:(eSellerate_InputString)publisherID   /* publisher ID code (always needed)                         */
  68.                                             eSellerID:(eSellerate_InputString)eSellerID     /* eSeller ID code (always needed)                           */
  69.                                             previewID:(eSellerate_InputString)previewID     /* preview certificate ID code                               */
  70.                                              errorURL:(eSellerate_InputString)errorURL      /* URL to show in case of error                              */
  71.                                          openingTitle:(eSellerate_InputString)openingTitle  /* custom title of the opening page of the Wizard            */
  72.                                           openingText:(eSellerate_InputString)openingText   /* custom first paragraph of the opening page of the Wizard  */
  73.                                            showFolder:(eSellerate_TrueOrFalse)showFolder    /* have the Engine open a window to display downloaded files */
  74.                                            trackingID:(eSellerate_InputString)trackingID    /* tracking ID code                                          */
  75.                                           affiliateID:(eSellerate_InputString)affiliateID   /* affiliate ID code                                         */
  76.                                              couponID:(eSellerate_InputString)couponID      /* coupon ID code                                            */
  77.                                          activationID:(eSellerate_InputString)activationID  /* activation ID code, to activate serial number             */
  78.                                             extraData:(eSellerate_InputString)extraData;    /* extra information, for instance for custom serial numbers */
  79.  
  80.                                                                                                     /* check for an update without invoking the Wizard ***/
  81. - (eSellerate_ErrorCode)silentCheckForUpdateWithPublisherID:(eSellerate_InputString)publisherID     /* publisher ID code (always needed)                 */
  82.                                                   eSellerID:(eSellerate_InputString)eSellerID       /* eSeller ID code (always needed)                   */
  83.                                                   previewID:(eSellerate_InputString)previewID       /* preview certificate ID code                       */
  84.                                                  trackingID:(eSellerate_InputString)trackingID      /* tracking ID code                                  */
  85.                                                askToConnect:(eSellerate_TrueOrFalse)askToConnect;   /* ask to connect when no active connection is found */
  86.  
  87.                                                                                 /* call on the Engine to launch an update ********/
  88. - (eSellerate_ErrorCode)launchUpdateFile:(eSellerate_FileLocation)updaterFile   /* location of file to launch (always needed)    */
  89.                             fileToUpdate:(eSellerate_FileLocation)fileToUpdate; /* location of file to which to apply the update */
  90.  
  91. /* Build an array of dictionaries to access Shopping Cart information */
  92. /* Each index of the NSArray contains a dictionary that has two keys: */
  93. /* keSellerateProductIDKey will give you the Product ID (NSString)    */
  94. /* keSellerateSKUIDKey will give you the SKU ID (NSString)            */
  95.  
  96. - (NSArray *)indexShoppingCartData;
  97.  
  98. /* Build an array of dictionaries to access Serial Number information **********************/
  99. /* Each index of the NSArray contains a dictionary that has three keys:                       */
  100. /* keSellerateProductIDKey will give you the Product ID (NSString)                           */
  101. /* keSellerateSerialNumberKey will give you the Serial Number (NSString)                   */
  102. /* keSellerateNameBasedKey will give you the name the serial number is based on (NSString) */
  103. - (NSArray *)indexSerialNumberData;
  104.  
  105. /* Build an array of dictionaries to access File Location information **********************/
  106. /* Each index of the NSArray contains a dictionary that has two keys:                       */
  107. /* keSellerateProductIDKey will give you the Product ID (NSString)                           */
  108. /* keSellerateFileLocationKey will give you the downloaded file's location (NSURL)           */
  109. - (NSArray *)indexFileLocationData;
  110.  
  111. /* free memory allocated by the Engine */
  112. - (void)deleteResultData;
  113.                                                                                                     /* confirm origin of serial number and lock it to hardware ************/
  114. - (eSellerate_ErrorCode)activateSerialNumberWithPublisherID:(eSellerate_InputString)publisherID     /* publisher ID code (always needed)                                  */
  115.                                                activationID:(eSellerate_InputString)activationID    /* activation ID code to associate with serial number (always needed) */
  116.                                                serialNumber:(eSellerate_InputString)serialNumber    /* serial number (always needed)                                      */
  117.                                                askToConnect:(eSellerate_TrueOrFalse)askToConnect;   /* ask to connect when no active connection is found                  */
  118.  
  119.     /* additional failure codes:
  120.     * -25000: unknown activationID
  121.     * -25001: unknown serialNumber
  122.     * -25002: improper usage
  123.     * -25003: blacklisted serialNumber
  124.     * -25004: invalid order
  125.     * -25005: activation limit met
  126.     */
  127.  
  128.                                                                                                 /* verify that serial number is activated and locked to hardware ****/
  129. - (eSellerate_ErrorCode)validateActivationWithPublisherID:(eSellerate_InputString)publisherID   /* publisher ID code (always needed)                                */
  130.                                              activationID:(eSellerate_InputString)activationID  /* activation ID code associated with serial number (always needed) */
  131.                                              serialNumber:(eSellerate_InputString)serialNumber; /* serial number (always needed)                                    */
  132.     /* additional failure codes:
  133.     * -25006: unknown activationKey
  134.     * -25007: hardware mismatch
  135.     * -25008: invalid activationKey
  136.     */
  137.                                                                                                         /* confirm origin of serial number and lock it to hardware **************/
  138. - (eSellerate_ErrorCode)manualActivateSerialNumberWithPublisherID:(eSellerate_InputString)publisherID   /* publisher ID code (always needed)                                    */
  139.                                                      activationID:(eSellerate_InputString)activationID  /* activation ID code to associate with serial number (always needed)   */
  140.                                                      serialNumber:(eSellerate_InputString)serialNumber  /* serial number (always needed)                                        */
  141.                                                      titlePreface:(eSellerate_InputString)titlePreface  /* custom text, to preface Wizard titles                                */
  142.                                                      otherOptions:(eSellerate_InputString)otherOptions; /* custom text, to include phone number, email address or other contact */
  143.  
  144. - (eSellerate_ErrorCode)installEngine;  /* install the Engine from resource to its proper system location */
  145.  
  146. - (eSellerate_FileLocation)applicationLocation; /* determine file location of the application */
  147.  
  148. - (eSellerate_ErrorCode)getLastErrorCode; /* give the last error detected in the Engine */
  149.  
  150. - (eSellerate_DaysSince2000)validateSerialNumber:(eSellerate_InputString)serialNumber
  151.                                     nameBasedKey:(eSellerate_InputString)nameBasedKey
  152.                                     extraDataKey:(eSellerate_InputString)extraDataKey
  153.                                     publisherKey:(eSellerate_InputString)publisherKey;
  154.  
  155. - (eSellerate_DaysSince2000)eSellerateToday;    /* days from 1/1/2000 to today */
  156.  
  157. @end
  158.